package com.rds.workflow.mapper;


import com.rds.workflow.domain.RdaWorkflow2NodeTempleteRel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RdaWorkflow2NodeTempleteRelMapper {

    /**
     * 新增流程模板节点关系
     *
     * @param rdaWorkflow2NodeTempleteRel 流程模板节点关系
     * @return 结果
     */
    public int insertRdaWorkflow2NodeTempleteRel(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel);

    /**
     * 流程模板节点关系表
     * @param toid 流程模板节点id
     * @return 结果
     */
    public int deleteRdaWorkflow2NodeTempleteRelById(@Param("workflowid")Long workflowid,@Param("toid") Long toid,@Param("operationType") String operationType);
    /**
     * 流程模板节点关系表
     * @param toid 流程模板节点id
     * @return 结果
     */
    public int deleteRdaWorkflow2NodeTempleteRel(Long[] toid);

    public int updateRdaWorkflow2NodeTempleteRel(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel);

    /**
     * 查询From节点名称、描述
     */
    public List<RdaWorkflow2NodeTempleteRel> selectRdaWorkflow2NodeTempleteRelList(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel);



    public List<RdaWorkflow2NodeTempleteRel> selectRdaWorkflow2NodeTempleteRelList2(@Param("workflowid") Long workflowid);

    /**
     * 查询From节点名称、描述
     */
    public List<RdaWorkflow2NodeTempleteRel> selectRdaWorkflow2NodeTempleteRelByFromid(@Param("workflowid") Long workflowid,@Param("fromid") Long fromid,@Param("operationType") String operationType);

    /**
     * 查询to节点名称、描述
     */
    public List<RdaWorkflow2NodeTempleteRel> selectRdaWorkflow2NodeTempleteRelByToid(@Param("workflowid") Long workflowid,@Param("toid") Long toid,@Param("operationType") String operationType);

    public List<RdaWorkflow2NodeTempleteRel> selectRdaNoderelTempleteByWorkflowid(@Param("workflowid") Long workflowid);

    /**
     * 查询拒绝详情页
     * @param id
     * @return
     */
    public RdaWorkflow2NodeTempleteRel selectRdaWorkflow2NodeTempleteRelByid(Long id);
    /**
     * 批量删除
     *
     * @param ids 流程模板节点关系ID
     * @return 结果
     */
    public int deleteRdaNodeTempleteByIds(Long[] ids);

    /**
     * 修改
     * @param rdaWorkflow2NodeTempleteRel
     * @return 结果
     */
    public int updateRdaWorkflow2NodeTempleteRelAll(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel);

    /**
     * 流程模板节点关系表
     * @param ids 流程模板id
     * @return 结果
     */
    public int deleteRdaWorkflow2NodeTempleteRelByWorkflowIds(Long[] ids);

    /**
     * 删除流程模板节点关系表
     * @param workflowid 流程模板节点id
     * @param nodeId 节点id
     * @return 结果
     */
    public int deleteRdaWorkflow2NodeTempleteRelByWorkflowid(@Param("workflowid") Long workflowid,@Param("nodeId") Long nodeId);

}
